package com.hwadee.ems.util;

import com.hwadee.ems.domain.dto.UserDTO;

/**
 * @author EnosElinsa
 * @since 2024/06/19
 */
public class UserHolder {
    
    private static final ThreadLocal<UserDTO> tl = new ThreadLocal<>();

    public static void saveUser(UserDTO user) {
        tl.set(user);
    }

    public static UserDTO getUser() {
        return tl.get();
    }

    public static void removeUser() {
        tl.remove();
    }

}
